
	// recibe una linea (lista de puntos, en XZ)
	//y la altura de la pared
	function ParedGeometry (puntos, altura){
		THREE.Geometry.call( this );

		var punto = null;
		for (var i = 0, l = puntos.length; i < l; i++ ) {
			punto = puntos[i];
			this.vertices.push( new THREE.Vector3( punto.x, punto.y, punto.z) );
			this.vertices.push( new THREE.Vector3( punto.x, punto.y + altura, punto.z) );
		}


		for (var i = 0, l = this.vertices.length - 3; i < l; i += 2) {

			var a = i;
			var b = i+2;
			var c = i+3;
			var d = i+1;
//
			var v1 = new THREE.Vector3();
			v1.copy(this.vertices[i+1]).subSelf(this.vertices[i]);
			
			var v2 = new THREE.Vector3();
			v2.copy(this.vertices[i+3]).subSelf(this.vertices[i]);
			
		//	var normal = new THREE.Vector3(0,0,1);
			var normal = new THREE.Vector3();
			normal.cross(v1,v2).normalize();
			
			//console.log('normal', normal.x, normal.y, normal.z);
			
			var face = new THREE.Face4( a, b, c, d );
			face.normal.copy( normal );
			face.vertexNormals.push( normal.clone(), normal.clone(), normal.clone(), normal.clone() );

			this.faces.push( face );
			this.faceVertexUvs[ 0 ].push( [
				new THREE.UV( 0,0 ),
				new THREE.UV( 1,0),
				new THREE.UV( 1,1 ),
				new THREE.UV( 0,1 )
			] );

		}
		
		this.computeCentroids();
//		this.computeVertexNormals();
//		this.computeFaceNormals();
		//this.computeBoundingSphere();
	}
	ParedGeometry.prototype = new THREE.Geometry();
	ParedGeometry.prototype.constructor = ParedGeometry;

	